Trip Data Analysis


Set up

#packages
library(tidyverse)
library(sf)
library(lubridate)
library(mapview)
library(viridis)
library(ggplot2)
library(kableExtra)
##Functions
#Plot functions
plotTheme <- theme(
  plot.title =element_text(size=12),
  plot.subtitle = element_text(size=8),
  plot.caption = element_text(size = 6),
  axis.text.x = element_text(size = 10, angle = 45, hjust = 1),
  axis.text.y = element_text(size = 10),
  axis.title.y = element_text(size = 10),
  # Set the entire chart region to blank
  panel.background=element_blank(),
  plot.background=element_blank(),
  #panel.border=element_rect(colour="#F0F0F0"),
  # Format the grid
  panel.grid.major=element_line(colour="#D0D0D0",size=.2),
  axis.ticks=element_blank())

mapTheme <- function(base_size = 12) {
  theme(
    text = element_text( color = "black"),
    plot.title = element_text(size = 16,colour = "black"),
    plot.subtitle=element_text(face="italic"),
    plot.caption=element_text(hjust=0),
    axis.ticks = element_blank(),
    panel.background = element_blank(),axis.title = element_blank(),
    axis.text = element_blank(),
    axis.title.x = element_blank(),
    axis.title.y = element_blank(),
    panel.grid.minor = element_blank(),
    panel.border = element_rect(colour = "black", fill=NA, size=2),
    strip.text.x = element_text(size = 14))
}


Data Cleaning


There are several steps that we have used to clean our trip data, including both cleaning data fall outside of New York City, and wrong trajectories inside of city.

Clip Trip Data


There are two types of data that are fall outside of New York City. We pick trips in March5th to demonstrate how these data look like. The first type is that there are some data located in Montreal, like the following image shows.
Wrong trajectories falling outisde of NYC-1

Wrong trajectories falling outisde of NYC-1


Another type of wrong trajectories outside of NYC are trips that are connected to another country, like the following image:
Wrong trajectories falling outisde of NYC-2

Wrong trajectories falling outisde of NYC-2


In order to clean up these data, we use both clip and spatial intersection. To illustrate, the first type of data could be filtered out by clipping the trip data which are inside NYC boundary. However, for the second type of data, we find out the intersected points of trajectories with the NYC boundary, and then filter out those trips with their unique id. Due to the size of data, we import data which are already cleaned up in the later part, and provide the codes that we used to clean data.

#sample code that we used to clean up data
##Get NYC data
#Reference: http://gis.ny.gov/gisdata/inventories/details.cfm?DSID=927
#NYC <- st_read("E:/NYCDOT/NYS_Civil_Boundaries_SHP/Cities_Towns.shp") %>%
  #st_transform(st_crs(March)) %>%
  #filter(NAME == "New York")

#NYC_line <- st_cast(NYC, "MULTILINESTRING")

#Marchintersect <- March[NYC_line,]

#March18_cleaned <- March[NYC, ] %>%
  #filter(! id %in% Marchintersect$id)

There are also trips inside NYC that have strange trajectories. We plan to filter out these data by using several steps.
  1. Buffering data of bike lanes.
  2. Transfer geometries of trips data from linestring to points.
  3. Filter out trip data which overlay with the buffered bike lanes.
  4. Gorup the points of trip data which are in the same route and have same id, which is identical to each trip.


15 feet buffer


Due to the size of data and hope to keep associated attribute table, we buffer the road data in ArcGIS. During the process of buffering, there is also trade-off:
Buffer Choice

Buffer Choice


Later, we will use the buffer of bike lanes to find out overlapped trip points. However, as the figure shows, when the buffer becomes wider, there are more overlaps between bike lanes. Sometimes, the trajectories of trips do not fully overlap with the road because the road buffer is not wide enough to cover all the trips. In other words, choosing thinner buffer has potential to loss more data, but choosing thicker buffer brings problems of overlapping roads. In the consideration of this trade-off, we choose to use 15-feet buffer for bike lanes.

Line to Point


Similarly, due to the size of dataset and we would like to keep associated attributes of data, we use Geoprocessing Tool, Generate Pointes Along Lines, in ArcGIS to transfer our geometries from linestring to points. In order to keep the progress consistent, we make the Point Placement by 150 meters. In other words, for one trajectory of bike trip, there will be a point by each 150-meter, including the end points.

Trips on road


Then we use spatial intersect to allocate Street Name on trip points. If the trip points are intersect with buffered lanes, they will be assigned to a Street Name. But there is condition that one trip point will locate on several roads, at the condition when the roads are overlapped with each other at nodes.
Point on Several Roads

Point on Several Roads


Like the point shown in the figure. It is located at the node where LEXINGTON AVENUE LINE, EAST 77 STREET, and LENOX HILL HOSPITAL are overlapped. However, the spatial intersect within st_join function only assign one road name on that point. This process is random but is acceptable because it does not assign multiple Street Name on the point.

Exploratory Analysis

Yearly Trend


We would like to at first have a sense about how the trip data vary over year.

March2018 <- st_read("E:/NYCDOT/rideData_cleaned/March2018/March18_cleaned.shp")
Apr2018 <- st_read("E:/NYCDOT/rideData_cleaned/Apr2018/Apr18_cleaned.shp")
May2018 <- st_read("E:/NYCDOT/rideData_cleaned/May2018/May18_cleaned.shp")
Jun2018 <- st_read("E:/NYCDOT/rideData_cleaned/Jun2018/June18_cleaned.shp")
July2018 <- st_read("E:/NYCDOT/rideData_cleaned/July2018/July18_cleaned.shp")
Aug2018 <- st_read("E:/NYCDOT/rideData_cleaned/Aug2018/Aug18_cleaned.shp")
Sep2018 <- st_read("E:/NYCDOT/rideData_cleaned/Sep2018/Sep18_cleaned.shp")
Oct2018 <- st_read("E:/NYCDOT/rideData_cleaned/Oct2018/Oct18_cleaned.shp")
Nov2018 <- st_read("E:/NYCDOT/rideData_cleaned/Nov2018/Nov18_cleaned.shp")
Dec2018 <- st_read("E:/NYCDOT/rideData_cleaned/Dec2018/Dec18_cleaned.shp")


1.Daily Trend
dayTrend2018 <- rbind(March2018 %>% 
        as.data.frame() %>% 
        group_by(day) %>%
        tally() %>%
        mutate(month = 3), 
      Apr2018 %>%
        as.data.frame() %>%
        group_by(day) %>%
        tally() %>%
        mutate(month = 4),
      May2018 %>%
        as.data.frame() %>%
        group_by(day) %>%
        tally() %>%
        mutate(month = 5),
      Jun2018 %>%
        as.data.frame() %>%
        group_by(day) %>%
        tally() %>%
        mutate(month = 6),
      July2018 %>%
        as.data.frame() %>%
        group_by(day) %>%
        tally() %>%
        mutate(month = 7),
      Aug2018 %>%
        as.data.frame() %>%
        group_by(day) %>%
        tally() %>%
        mutate(month = 8),
      Sep2018 %>%
        as.data.frame() %>%
        group_by(day) %>%
        tally() %>%
        mutate(month = 9),
      Oct2018 %>%
        as.data.frame() %>%
        group_by(day) %>%
        tally() %>%
        mutate(month = 10),
      Nov2018 %>%
        as.data.frame() %>%
        group_by(day) %>%
        tally() %>%
        mutate(month = 11),
      Dec2018 %>%
        as.data.frame() %>%
        group_by(day) %>%
        tally() %>%
        mutate(month = 12))
ggplot(dayTrend2018, aes(x=day, y=n, color=as.character(month))) + 
  geom_line() +
  labs(title = "Daily Trend in year 2018",
       x = "Day",
       y = "Count",
       colour="Month") +
  plotTheme +
  theme(plot.title = element_text(size=14),
        axis.title.x = element_text(size = 12),
        axis.title.y = element_text(size = 12))


About the Daily Trend in 2018, there is no clear and general trend.

2. Hourly Trend
hourTrend2018 <- rbind(March2018 %>% 
        as.data.frame() %>% 
        group_by(rhour) %>%
        tally() %>%
        mutate(month = 3), 
      Apr2018 %>%
        as.data.frame() %>%
        group_by(rhour) %>%
        tally() %>%
        mutate(month = 4),
      May2018 %>%
        as.data.frame() %>%
        group_by(rhour) %>%
        tally() %>%
        mutate(month = 5),
      Jun2018 %>%
        as.data.frame() %>%
        group_by(rhour) %>%
        tally() %>%
        mutate(month = 6),
      July2018 %>%
        as.data.frame() %>%
        group_by(rhour) %>%
        tally() %>%
        mutate(month = 7),
      Aug2018 %>%
        as.data.frame() %>%
        group_by(rhour) %>%
        tally() %>%
        mutate(month = 8),
      Sep2018 %>%
        as.data.frame() %>%
        group_by(rhour) %>%
        tally() %>%
        mutate(month = 9),
      Oct2018 %>%
        as.data.frame() %>%
        group_by(rhour) %>%
        tally() %>%
        mutate(month = 10),
      Nov2018 %>%
        as.data.frame() %>%
        group_by(rhour) %>%
        tally() %>%
        mutate(month = 11),
      Dec2018 %>%
        as.data.frame() %>%
        group_by(rhour) %>%
        tally() %>%
        mutate(month = 12))
ggplot(hourTrend2018, aes(x=rhour, y=n, color=as.character(month))) + 
  geom_line() +
  labs(title = "Hourly Trend in year 2018",
       x = "Hour",
       y = "Count",
       colour="Month") +
  plotTheme +
  theme(plot.title = element_text(size=14),
        axis.title.x = element_text(size = 12),
        axis.title.y = element_text(size = 12))


From the Hourly Trend graph in 2018, the bike trips peak at noon and at late night.

3.Weekday Trend
wdayTrend2018 <- rbind(March2018 %>% 
        as.data.frame() %>% 
        mutate(wday = wday(time)) %>%
        group_by(wday) %>%
        tally() %>%
        mutate(month = 3), 
      Apr2018 %>%
        as.data.frame() %>%
        mutate(wday = wday(time)) %>%
        group_by(wday) %>%
        tally() %>%
        mutate(month = 4),
      May2018 %>%
        as.data.frame() %>%
        mutate(wday = wday(time)) %>%
        group_by(wday) %>%
        tally() %>%
        mutate(month = 5),
      Jun2018 %>%
        as.data.frame() %>%
        mutate(wday = wday(time)) %>%
        group_by(wday) %>%
        tally() %>%
        mutate(month = 6),
      July2018 %>%
        as.data.frame() %>%
        mutate(wday = wday(time)) %>%
        group_by(wday) %>%
        tally() %>%
        mutate(month = 7),
      Aug2018 %>%
        as.data.frame() %>%
        mutate(wday = wday(time)) %>%
        group_by(wday) %>%
        tally() %>%
        mutate(month = 8),
      Sep2018 %>%
        as.data.frame() %>%
        mutate(wday = wday(time)) %>%
        group_by(wday) %>%
        tally() %>%
        mutate(month = 9),
      Oct2018 %>%
        as.data.frame() %>%
        mutate(wday = wday(time)) %>%
        group_by(wday) %>%
        tally() %>%
        mutate(month = 10),
      Nov2018 %>%
        as.data.frame() %>%
        mutate(wday = wday(time)) %>%
        group_by(wday) %>%
        tally() %>%
        mutate(month = 11),
      Dec2018 %>%
        as.data.frame() %>%
        mutate(wday = wday(time)) %>%
        group_by(wday) %>%
        tally() %>%
        mutate(month = 12))
ggplot(wdayTrend2018, aes(x=wday, y=n, color=as.character(month))) + 
  geom_line() +
  scale_x_continuous(breaks = seq(0, 7, by = 1)) +
  labs(title = "Weekday Trend in year 2018",
       x = "Day of Week",
       y = "Count",
       colour="Month") +
  plotTheme +
  theme(plot.title = element_text(size=14),
        axis.title.x = element_text(size = 12),
        axis.title.y = element_text(size = 12))


If we view the data from the day of week, there is no clear trend about the data. Overall, the number of trips peak at noon and at night, and the later months tend to have more trips than earlier months. There is no clear trend how the data vary among days or days of week.

Borough Level Analysis


Because Manhanttan as our major study hour, we also visualize the density of trips on each roads in Manhanttan, in July 2018 and July 2019.
Due to the size of the dataset, we only choose July 22 pm as our analyzing time.Then, we narrow our data into Manhattan. Because the redundacy of process, the following part just show how we did the process but will not run the code. Later, the processed data will be directly imported.

#import borough Manhanttan
borough <- st_read("E:/NYCDOT/Borough Boundaries/geo_export_4c045526-dcb9-4e1a-b602-59b848e20e6a.shp") %>%
  filter(boro_name == "Manhattan") %>%
  st_transform(st_crs(July2018))
Manhatan_line <- st_cast(borough, "MULTILINESTRING")

#import bike lane data
bike15 <- st_read("E:/NYCDOT/nyclion_20d/lion_buffer15/lion_buffer15.shp") %>%
  st_transform(st_crs(July2018)) %>%
  select(Street, FeatureTyp, SegmentTyp, FaceCode, SeqNum, StreetCode, LGC1, SegmentID,
         SHAPE_Leng, SHAPE_Area, geometry)

bike15M <- bike15[borough,]
##===Import data===##
#import July2018, and July2019 data
#July2018 <- st_read("E:/NYCDOT/rideData_cleaned/July2018/July18_cleaned.shp")
#July2019 <- st_read("E:/NYCDOT/rideData_cleaned/July2019/July19_cleaned.shp")


#Due to the size of dataset, only select rhour==22
#July18_22pm <- July2018 %>%
  #filter(rhour == 22)
#July19_22pm <- July2019 %>%
  #filter(rhour == 22)

##==select data only in Manhanttan==##

#find out intersection points
#July18_intersect <- July18_22pm[Manhatan_line,]
#July19_intersect <- July19_22pm[Manhatan_line,]

#only in Manhattan
#July18M_22pm <- July18_22pm[borough,] %>%
  #filter(!id %in% July18_intersect$id)
#July19M_22pm <- July19_22pm[borough,] %>%
  #filter(!id %in% July19_intersect$id)

#check
#mapview(July18M_22pm)
#mapview(July19M_22pm)



##==change trip data's geometry from linestring to points==#
#save the file
#st_write(July18M_22pm, "July18M_22pm.shp", driver = "ESRI Shapefile")
#st_write(July19M_22pm, "July19M_22pm.shp", driver = "ESRI Shapefile")


Visualization
# import results after using ArcGIS (by 150m)
pJuly18M_22pm <- st_read("E:/NYCDOT/riderpoint_shp/July/generated/July18M_22pm_pnts.shp")
pJuly19M_22pm <- st_read("E:/NYCDOT/riderpoint_shp/July/generated/July19M_22pm_pnts.shp")


##==Select points within the roads==##
inrpnts_July18 <- pJuly18M_22pm[bike15M,]
inrpnts_July19 <- pJuly19M_22pm[bike15M,]

#allocate Street Name on roads
inrpnts_July18 <- st_join(inrpnts_July18, bike15M, join = st_intersects, left = TRUE)
inrpnts_July19 <- st_join(inrpnts_July19, bike15M, join = st_intersects, left = TRUE)

##==group points inside same street as linestring==#
#Reference:https://stackoverflow.com/questions/50908771/create-multilines-from-points-grouped-by-id-with-sf-package
pnts2Line_18 <- inrpnts_July18 %>%
  group_by(id, Street) %>%
  summarise(do_union = FALSE) %>%
  st_cast("LINESTRING")

pnts2Line_19 <- inrpnts_July19 %>%
  group_by(id, Street) %>%
  summarise(do_union = FALSE) %>%
  st_cast("LINESTRING")

#Count number of trips on each street
ntrips_July18 <- pnts2Line_18 %>%
  st_drop_geometry() %>%
  group_by(Street) %>%
  summarise(Count = n())

ntrips_July19 <- pnts2Line_19 %>%
  st_drop_geometry() %>%
  group_by(Street) %>%
  summarise(Count = n())


##==bind the trips to road table==##
road_18 <- merge(bike15M %>% select(Street, geometry), ntrips_July18, by = ("Street"), all.x=TRUE)
road_19 <- merge(bike15M %>% select(Street, geometry), ntrips_July19, by = ("Street"), all.x=TRUE)

#add year
road_18$year <- 2018
road_19$year <- 2019
##==visualize==##
ggplot() +
  geom_sf(data = rbind(road_18, road_19), aes(color = Count), alpha = 0.9)+ 
  facet_wrap(~year) +
  scale_colour_viridis(direction = -1,
                       discrete = FALSE, option="viridis",
                       na.value="#D4D4D4") +
  labs(title = "Bike Trip Counts in July 22pm") +
  mapTheme()


Trips Comparsion on Added Bike Lanes
##==Find out the number of trips on new added bike lanes==##
#import data of new bike lanes (buffer 15)
bike18new <- st_read("E:/NYCDOT/bikeDiff/bike_1718Diff/bikelane_1718DiffBuffer.shp") %>%
  st_transform(st_crs(July2018))

#clip new bike lanes in Manhanttan
bike18new_M <- bike18new[borough,]

#assign Street Name to new bike lanes
bike18new_M <- st_join(bike18new_M %>% select(-Street), bike15M %>%
                       select(Street, geometry), join = st_intersects, left = TRUE)


#Find the trip points overlap with roads
tripsinNew18 <- pJuly18M_22pm[bike18new_M,]
tripsinNew19 <- pJuly19M_22pm[bike18new_M,]

#allocate road name on pnts
newtrips18 <- st_join(tripsinNew18, bike18new_M %>% select(Street, geometry),
                      join = st_intersects, left = TRUE) %>% na.omit()

newtrips19 <- st_join(tripsinNew19, bike18new_M %>% select(Street, geometry),
                      join = st_intersects, left = TRUE) %>% na.omit()



#group points inside same street as linestring
new.pnts2Line18 <- newtrips18 %>%
  group_by(id, Street) %>%
  summarise(do_union = FALSE) %>%
  st_cast("LINESTRING")

new.pnts2Line19 <- newtrips19 %>%
  group_by(id, Street) %>%
  summarise(do_union = FALSE) %>%
  st_cast("LINESTRING")

#Count
n.new18 <- new.pnts2Line18 %>%
  st_drop_geometry() %>%
  group_by(Street) %>%
  summarise(Count = n()) %>%
  mutate(year = 2018)

n.new19 <- new.pnts2Line19 %>%
  st_drop_geometry() %>%
  group_by(Street) %>%
  summarise(Count = n()) %>%
  mutate(year = 2019)
#Create a summarise table
#Outer join table
new.num <- merge(x = n.new18, y = n.new19, by = "Street", all = TRUE)

#assign NA to 0
new.num[is.na(new.num)] <- 0

#Find out Diff
new.num <- new.num %>%
  mutate(Diff = Count.y - Count.x)
new.num %>% 
  select(Street, Diff) %>% 
  kbl() %>%
  kable_styling()
Street Diff
1 AVENUE 10
12 AVENUE 1
14 STREET/CANARSIE LINE 58
2 AVENUE 270
2 AVENUE LINE 273
2000 CB BOUNDARY 33
2010 CB BOUNDARY 62
3 AVE-E 128 STREET PED OVPS 1
3 AVENUE 3
4 AVENUE 41
5 AVENUE -1
63 STREET LINE 18
7 AVENUE 237
7 AVENUE SOUTH 28
8 AVENUE 42
8 AVENUE LINE 163
9 AVENUE 129
A NEW STREET 2
ANN STREET 18
ASTORIA LINE 9
AVENUE C 19
AVENUE OF THE AMERICAS 42
BEAVER STREET 0
BEDFORD STREET 17
BEEKMAN STREET 16
BIKE PATH 12
BRIDGE STREET 5
BROAD STREET 6
BROADWAY LINE 3
BROOKLYN BRDG PED AND BIKE PATH 3
BROOKLYN BRIDGE APPROACH 12
CATHEDRAL PARKWAY 2
CEDAR STREET 8
CENTRAL PARK WEST 18
CENTRE STREET 12
CHARLTON STREET 42
CHRISTOPHER STREET 17
CITY HALL PARK GREENWAY 3
CLARK STREET LINE 18
COENTIES ALLEY 4
COENTIES SLIP 1
COLUMBUS AVENUE 24
CT BOUNDARY 7
DISTRICT BOUNDARY 191
EAST 110 STREET 17
EAST 111 STREET 7
EAST 118 STREET 3
EAST 119 STREET 7
EAST 12 STREET 38
EAST 120 STREET 2
EAST 126 STREET 3
EAST 128 STREET -3
EAST 13 STREET 21
EAST 23 STREET 78
EAST 24 STREET 117
EAST 25 STREET 44
EAST 25 STREET PEDESTRIAN OVPS 6
EAST 29 STREET 58
EAST 3 STREET 3
EAST 30 STREET 134
EAST 31 STREET 86
EAST 32 STREET 68
EAST 33 STREET 41
EAST 34 STREET 3
EAST 35 STREET 1
EAST 39 STREET 45
EAST 4 STREET 4
EAST 40 STREET 87
EAST 41 STREET 25
EAST 59 STREET 12
EAST 60 STREET 9
EAST 61 STREET 19
EAST 62 STREET 18
EAST 63 STREET 15
EAST 64 STREET 20
EAST 65 STREET 16
EAST 66 STREET 21
EAST 67 STREET 17
EAST 68 STREET 9
EAST 7 STREET 13
EAST 74 STREET 7
EAST 75 STREET 14
EAST 76 STREET 19
EAST 77 STREET 11
EAST 78 STREET 4
EAST 78 STREET PEDESTRIAN OVPS 3
EAST 79 STREET 13
EAST 8 STREET 17
EAST 80 STREET 19
EAST 81 STREET 13
EAST 82 STREET 5
EAST 83 STREET 8
EAST 84 STREET 5
EAST 89 STREET 8
EAST 9 STREET 4
EAST RIVER ESPLANADE 11
EAST RIVER SHORELINE WEST 2
EAST RIVER WEST CHANNEL SHL 3
ED KOCH QUEENSBORO BRIDGE APPR 12
ED KOCH QUEENSBORO BRIDGE EXIT 17
EDENS ALLEY 9
EXCHANGE PLACE 3
FLETCHER STREET 2
FRANKLIN D ROOSEVELT DRIVE 19
FRAWLEY CIRCLE 6
FREDERICK DOUGLASS BOULEVARD 19
FRONT STREET 2
FULTON STREET 15
GOLD STREET 25
GOUVERNEUR LANE 1
GREENWICH AVENUE 28
GREENWICH STREET 1
HANOVER SQUARE 6
HANOVER STREET 4
HUDSON RIVER GREENWAY 8
HUDSON RIVER SHORELINE -2
HUDSON STREET 10
IRT-1-BROADWAY/ 7 AVENUE LINE 279
JOE DIMAGGIO HIGHWAY 1
JOHN FINLEY WALK 3
JOHN STREET 10
LENOX AVENUE LINE -1
LEXINGTON AVENUE 10
LEXINGTON AVENUE LINE 63
LIBERTY STREET -2
LIRR PENN CENTRAL LINE 68
MAC DOUGAL STREET 11
MADISON AVENUE 7
MAIDEN LANE 1
METRO NORTH-CONNECTING RAIL LINE 4
MILL LANE 2
MOORE STREET 0
NASSAU STREET 7
NASSAU STREET LINE 13
OLD SLIP 6
PARK AVENUE 13
PARK ROW 12
PATH-JOURNAL SQ- 33 ST LINE 17
PEARL STREET 11
PEDESTRIAN AND BIKE PATH LINK 0
PEDESTRIAN PATH 68
PIER 0
PIER 40 DRIVEWAY 21
PINE STREET 7
PLATT STREET 11
PLEASANT AVENUE 3
PRINCE STREET 42
QUEENS MIDTOWN TUNNEL APPROACH 4
SOUTH STREET 7
SOUTH WILLIAM STREET 2
SPRUCE STREET 22
STATE STREET 1
STONE STREET 1
VARICK STREET 41
WALL STREET 6
WARREN STREET 2
WASHINGTON STREET 20
WATER STREET 3
WEST 104 STREET -1
WEST 105 STREET 1
WEST 106 STREET 3
WEST 11 STREET 28
WEST 111 STREET -1
WEST 114 STREET 3
WEST 115 STREET 19
WEST 116 STREET 17
WEST 12 STREET 65
WEST 126 STREET 2
WEST 128 STREET -3
WEST 13 STREET 78
WEST 14 STREET 58
WEST 15 STREET 47
WEST 16 STREET 60
WEST 17 STREET 52
WEST 18 STREET 58
WEST 19 STREET 66
WEST 20 STREET 70
WEST 21 STREET 75
WEST 22 STREET 85
WEST 23 STREET 75
WEST 24 STREET 39
WEST 25 STREET 47
WEST 26 STREET 50
WEST 27 DRIVE 17
WEST 27 STREET 49
WEST 28 STREET 81
WEST 29 STREET 73
WEST 30 STREET 29
WEST 42 STREET 18
WEST 43 STREET 89
WEST 44 STREET 24
WEST 59 STREET 1
WEST 70 STREET 5
WEST 71 STREET 10
WEST 72 STREET 13
WEST 73 STREET 6
WEST 87 STREET 14
WEST 88 STREET 12
WEST 90 STREET 1
WEST 92 STREET 4
WEST 93 STREET 9
WEST 94 STREET 3
WEST 95 STREET 5
WEST END AVENUE 1
WEST HOUSTON STREET 34
WEST STREET 34
WHITEHALL STREET 3
WILLIAM STREET 13
YORK AVENUE 8
ggplot(data=new.num, aes(x=Street, y=Diff)) +
  geom_bar(stat="identity") +
  theme(
    # Remove grid lines
    panel.grid.major = element_blank(),
    panel.grid.minor = element_blank(),
    # Change axis line
    axis.title.x=element_blank(),
    axis.text.x=element_blank(),
    axis.ticks.x=element_blank()
  ) +
  labs(title = "Trip Differences of Added Bike Lanes",
       subtitle = "Between year 2018 and year 2019 during July 22pm",
       y = "Trip Differences")